(update_frame_tool_bar): Don't call x-gtk-map-stock if
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 22 Nov 2007 08:39:38 +0000 (08:39 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 22 Nov 2007 08:39:38 +0000 (08:39 +0000)
file for image is nil.

src/gtkutil.c

index 86a4703d0b7fbd0470b1e0ba3cf37474a9554833..9b2f11b1f721155c04f360126ba0677913570b5c 100644 (file)
@@ -3808,6 +3808,7 @@ update_frame_tool_bar (f)
       GtkWidget *wbutton = NULL;
       GtkWidget *weventbox;
       Lisp_Object func = intern ("x-gtk-map-stock");
+      Lisp_Object specified_file;
 
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i);
 
@@ -3826,8 +3827,9 @@ update_frame_tool_bar (f)
           continue;
         }
 
-      if (EQ (Qt, Ffboundp (func))) 
-        stock = call1 (func, file_for_image (image));
+      specified_file = file_for_image (image);
+      if (!NILP (specified_file) && EQ (Qt, Ffboundp (func)))
+        stock = call1 (func, specified_file);
 
       if (! NILP (stock) && STRINGP (stock))
         {